#pragma once

#include "FontRenderer.h"
#include "GLVertexArray.h"
#include "GLProgram.h"

class TextBox
{
public:
	TextBox(Text* text);
	~TextBox();

	void render();

	static void setWindowSize(float width, float height);

	Text* getText();

private:
	Text* _text;
	float _width, _height;

	GLVertexArray* _vao;
	GLBuffer* _vbo;

	void updateBounds();

	static GLProgram* _shader;
	struct TextBoxShaderUniformLocations {
		GLint invImageSize;
		GLint pOrigin;
		GLint color;
	};
	static TextBoxShaderUniformLocations _shaderUniformLocations;
};